<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<a href="javascript:publish()" class="btn1">发布</a>
<a href="javascript:cancelPublish()" class="btn1">取消发布</a>

<script type="text/javascript">
<!--

var httpController = new HttpController();
var contextPath = controller.getContextPath();

//发布
function publish(selectArr) {
	if(controller.checkSelect() == true) {
		var ids = controller.getSelectIds();
		httpController.executeHttp(contextPath + "/services?action=website.WebSiteAction&operate=publishColumn&ids=" + ids, function(result) {
			//alert(result);
			if(result == '1') {
				alert("发布成功！");
				document.location.href = contextPath + '/common/tree/treeList.jsp?tableName=' + controller.getTableName() + '&pid=' + controller.getPid();
			} else {
				alert("发布失败！");
			}
		});
	}
}

//取消发布
function cancelPublish() {
	if(controller.checkSelect() == true) {
		var ids = controller.getSelectIds();
		httpController.executeHttp(contextPath + "/services?action=website.WebSiteAction&operate=cancelpublishColumn&ids=" + ids, function(result) {
			//alert(result);
			if(result == '1') {
				alert("取消发布成功！");
				document.location.href = contextPath + '/common/tree/treeList.jsp?tableName=' + controller.getTableName() + '&pid=' + controller.getPid();
			} else {
				alert("取消发布失败！");
			}
		});
	}
}


//-->
</script>
